
import { BrowserRouter as Router, Redirect, Route } from 'react-router-dom'

import Login from './pages/Login'
import Layout from './pages/Layout'
import './App.scss'


const App = () => {
    return (
        <Router>
            <div className='app'>

                {/* 导入login组件 */}
                <Route exact path='/' render={() => <Redirect to='home' />}></Route>
                <Route path='/login' component={Login}></Route>
                <Route path='/home' component={Layout}></Route>
            </div>
        </Router>
    )
}

export default App
